function urlparam( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

var functions=new Array();
function setFilterChangedCallback(functionname) {
	functions[functions.length] = functionname;
}


var filters=new Array();
function addFilter(name, value) {
	filters[filters.length] = name + ':' + value;
	for (var i = 0; i < functions.length; i++) {
		functions[i]();
	}
}

function getFilters() {
	return filters;
}
